package com.yjt.fresh.adpater;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * @author Gxcheng
 * @desc    APP首页底部tab适配器
 * @time 2016/8/31 0031 11:07
 */
public class AdpTabLayoutViewPager extends FragmentPagerAdapter {
    private Context mContext;
    private Drawable mDrawable;
    private List<Fragment> mFragementList;
    private List<String> mTabTitles;

    public AdpTabLayoutViewPager(FragmentManager fm, List<String> title, List<Fragment> list) {
        super(fm);
        this.mFragementList=list;
        this.mTabTitles=title;
    }


    @Override
    public Fragment getItem(int position) {
        return mFragementList.get(position);
    }

    @Override
    public int getCount() {
        return mTabTitles.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTabTitles.get(position);
    }
}
